package com.it.zhangjun.thread;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;

/**
 * 功能描述
 *
 * @author z00018123
 * @since 2021-08-27
 */

public class ThreadTest {
    public static void main(String[] args) throws InterruptedException {
        List<Thread> saveThreads = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            FSImageSaver fsImageSaver = new FSImageSaver();
            Thread thread = new Thread(fsImageSaver);
            saveThreads.add(thread);
            thread.start();
        }
        for (Thread thread : saveThreads) {
            while (thread.isAlive()) {
                thread.join();
            }
        }
        System.out.println("".equals(StringUtils.EMPTY));
    }
}
